﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace LprMiddleWare.Views
{
    /// <summary>
    /// Interaction logic for WindowWhiteLists.xaml
    /// </summary>
    public partial class WindowWhiteLists : Window, INotifyPropertyChanged
    {
        public string[] WhiteLists
        {
            get { return this.nameList.Text.Split(new string[]{ Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries); }
            set { this.nameList.Text = string.Join(Environment.NewLine, value); }
        }

        public WindowWhiteLists()
        {
            DataContext = this;
            InitializeComponent();
            
        }


        public event PropertyChangedEventHandler PropertyChanged;

        protected virtual void OnPropertyChanged(string propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName));
        }

        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            this.DialogResult = true;
        }

        private void Button_Click_2(object sender, RoutedEventArgs e)
        {
            this.DialogResult = false;
        }
    }
}
